! function () {
  var PageTmp = Page;

  Page = function (pageConfig) {
    let config = {}
    // 设置全局默认分享
    config = Object.assign({
      onShareAppMessage: function () {
        return {
          title: `【全国公益寻宠平台】互助寻宠 互助提供寻宠线索 互助分享传播`,
          imageUrl: '/img/share-defa.png',
        }
      },
      onShareTimeline: function (res) {
        return {
          title: `【全国公益寻宠平台】互助寻宠 互助提供寻宠线索 互助分享传播`,
          imageUrl: '/img/share-defa.png',
        }
      },
    }, {
      ...pageConfig
    });
    PageTmp(config);
  };
}();
App({
  data: {
    sitename: '',
    apiUrl: 'https://ta.iinnc.com/api/',
    // apiUrl: 'https://xt.com/api',
    SessionKey: '', //用户token
  },
  onLaunch: function () {
    //console.log('App Launch');
  },
  onShow: function () {
    //console.log('App Show')
  },
  onHide: function () {
    //console.log('App Hide')
  },
  getInfo() {
    let slet = this;
    wx.request({
      url: slet.data.apiUrl + '/GetInformation.ashx',
      data: {},
      method: 'GET',
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        var resdata = JSON.parse(decodeURIComponent(JSON.stringify(res.data)));
        console.log('appinfo:', resdata);
        slet.globalData.xcxinfodata = resdata;
        slet.data.sitename = resdata.name;
      }
    })
  },
  globalData: {
    mapkey: 'APUBZ-WH7WQ-Z745L-GRX2F-Y5IKZ-LNB5F', //腾讯地图秘钥
    statusBarHeight: 0, //胶囊按钮高度
    longitude: '',
    latitude: '',
    xcxinfodata: {},
    userInfo: {
      uid: 0,
      avatarUrl: '',
      nickName: ''
    },
  }
})